package com.yq.testmodule.paging3

import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import androidx.paging.PagingData
import androidx.paging.cachedIn
import com.yq.testmodule.entity.NewsListEntity
import kotlinx.coroutines.flow.Flow

class TestPagingViewModel : ViewModel() {
    fun getPagingData(): Flow<PagingData<NewsListEntity>> {
        return Repository.getNewsList().cachedIn(viewModelScope)
    }
}